﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media; 
using XnaColor = Microsoft.Xna.Framework.Color;
using System.Reflection;   
using Roperation;
namespace Candy
{
    public delegate void RenderFunc();
    public class Global
    {
        static public bool IsMouseDraw = false;
        static public JYoperation.Class.JYcore.BigCore big;
        //static public SceneMapMgr MapMgr = null;
        static public JYoperation.Class.JYcore.Mmapcore jy;
        static public JYoperation.Class.JYcore.Scenecore jyScene;
        static public JYoperation.Class.JYcore.Weather jyWeather;
        static public JYoperation.Class.JYkdef jyKdef;
        static public bool IsNetGame = false;
        static public string Title
        {
            get { return MainGame.Window.Title; }
            set { MainGame.Window.Title = value; }
        }
        static public int Width = 1024;
        static public JYoperation.Class.JYEvents.UIsurface uiSurface = new JYoperation.Class.JYEvents.UIsurface();
        static public Rectangle WinRect
        {
            get { return new Rectangle(0, 0, Width, Height); }
        }
        static public int Height
        {
            get { return Width * 10 / 16; }
        }
        static public float Zoom = 1;
        //退出游戏
        static public bool IsExitGame = false;
        static public EffectMgr EftMgr = null;
        static public Texture2D BackBuf = null;
        static public Texture2D BigBuf = null;
        static public KGFramework MainGame;
        static public GraphicsDevice XnaDevice
        {
            get { return MainGame.GraphicsDevice; }
        }
        //当前活动的选项
        static public string strMenuTag = null;
        static public List<Rcore.RdataType> RangerTmp;
        static public Texture2D[] headTexture;
        public class SceneM
        {
            //0-title 1-smap/mmap 2 wmp 4-ending
            public static int Statue;

            //0.0f - 1.0f
            public static float Brightness;
            public static float Lighting;
            public static float BrightnessPertime;

            public static int X;
            public static int Y;
            public static int SCENENUM;

            public static int Mface;
            public static int Tface;//真实面向。。

            public static int MXtmp;
            public static int MYtmp;
        }
        public static JYcore.Spash splash = new JYcore.Spash();
        //public Global.SceneMType SceneM = new SceneMType();
        //static public 
        //public SceneMType
        static public RenderFunc RenderBuffer = null;
        static public RenderFunc RenderMouse = null;
        //surface底层
        static public uint[] sbuff = new uint[Global.Width * Global.Height];
        static public string IniFileName = ".\\Game.ini";
    }

    public enum EShowNameMode
    {
        ShowAll = 0,
        MouseOver = 1,
        KeyDown = 2,
    }
}